package com.star.util;

import org.springframework.web.servlet.view.freemarker.FreeMarkerView;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @Author: JXC
 * @Description: FreeMarker根目录获取
 * @Date: Created in 12:05  2021/4/8
 * @Modified By:
 */
public class MyFreeMarkerViewClass extends FreeMarkerView {
    @Override
    protected void exposeHelpers(Map<String, Object> model, HttpServletRequest request) throws Exception {
        model.put("base", request.getContextPath());
        super.exposeHelpers(model, request);
    }

}
